﻿


$(document).ready(function(){
    $("#actionbtn1").click(function(){
        swapshowElement($("#firstPanel"), $("#islbsUserPanel"));
    })
    $("#actionbtn2").click(function(){
        var checkValue = getlbsuser();
        
        switch (parseInt(checkValue)) {
            case 0:
                swapshowElement($("#islbsUserPanel"), $("#backupdatabasePanel"));
                break;
            case 1:
                swapshowElement($("#islbsUserPanel"), $("#databaseInstallPanel"));
                break;
        }
    })
    
    $("#db_mssql").click(function(){
        $("#sqlDataBasePanel").show();
    });
    $("#db_access").click(function(){
        $("#sqlDataBasePanel").hide();
    });
    $("#installSqlDataBase").click(function(){
    
        swapshowElement($("#databaseInstallPanel"), $("#blogSettingPanel"));
    });
    $("#installSqlDataBase").click(function(){
    
        swapshowElement($("#databaseInstallPanel"), $("#blogSettingPanel"));
    });
    $("#blogSettingBtn").click(function(){
        swapshowElement($("#blogSettingPanel"), $("#successPanel"));
    });
    $("#suceessBtn").click(function(){
		window.location.href="/default.aspx";
    });
})

function swapshowElement(elm1, elm2) {
    elm1.hide();
    elm2.show();
}

function getlbsuser() {
    var checkValue = 0;
    $("input[name='lbsuser']").each(function() {
        if (this.checked) {
            checkValue = this.value;
        }
    })
    return checkValue;
}
